range: Simplify highlight allocation
authorMatthias Clasen <mclasen@redhat.com>
Sat, 26 Mar 2016 17:50:42 +0000 (13:50 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 26 Mar 2016 17:50:42 +0000 (13:50 -0400)
Since we are really only interested in the center point of the
slider allocation, the pre-computed slider geometry is perfectly
fine, just use it always. This avoids the complication with
gadget visibility.

gtk/gtkrange.c

index 62d8f9d85683635ca5b78f7332354f8dd0ab7a81..0408a305eefa919467204202219f0e1cf7f42069 100644 (file)
@@ -2006,8 +2006,6 @@ gtk_range_allocate_trough (GtkCssGadget        *gadget,
     {
       GtkAllocation highlight_alloc, highlight_clip;
 
-      if (gtk_css_gadget_get_visible (priv->slider_gadget))
-        gtk_css_gadget_get_content_allocation (priv->slider_gadget, &slider_alloc, NULL);
       highlight_alloc = *allocation;
 
       if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)